package com.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.common.enumbean.ContactType;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
@Data
@NoArgsConstructor()
@TableName("customer_contacts")
public class CustomerContacts extends BaseBean{
    //CREATE TABLE customer_contacts (
    //    id INT AUTO_INCREMENT PRIMARY KEY,
    //    customer_id INT NOT NULL,
    //    contact_type ENUM('手机','工作电话','传真','微信','其他') NOT NULL,
    //    contact_value VARCHAR(100) NOT NULL,
    //    is_primary TINYINT(1) DEFAULT 0,
    //    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    //    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    //    INDEX contact_type_idx (contact_type)
    //) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    @TableId(type= IdType.AUTO)
    private Integer id;
    private Integer customer_id;
    private ContactType contact_type;
    private String contact_value;
    private Boolean is_primary;

    private Customers customer;
    private CustomerContacts customerContacts;
}
